package com.ocom.webapi.feign;

import com.ocom.common.constant.PayHandleUrl;
import com.ocom.common.entity.card.EntityXfRecordProcess;
import com.ocom.common.entity.typehandler.EntityCcbBusinessInfo;
import com.ocom.common.request.payhandle.*;
import com.ocom.common.request.ugcapi.order.SelectByOrderNosRequest;
import com.ocom.common.resp.Result;
import com.ocom.common.vo.ccb.CcbzhshAddUserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

@FeignClient(value = "payhandle")
public interface PayHandleFeignService {

    /**
     * 2.8.1 付款码支付请求（qrCodePay）
     */
    @PostMapping(PayHandleUrl.URL_PayHandle_qrCodePay)
    public Result qrCodePay(@RequestBody QrCodePayRequest request);

    /**
     *2.13.1 创建用户（ccbzhsh/addUser）
     * @param request
     * @return
     */
    @PostMapping(PayHandleUrl.URL_ccbzhshAddUser)
    Result ccbzhshAddUser(@RequestBody @Valid CcbzhshAddUserVo request);

    /**
     *2.13.2 删除用户（ccbzhsh/deleteUser）
     * @param request
     * @return
     */
    @PostMapping(PayHandleUrl.URL_ccbzhshDeleteUser)
    Result URL_ccbzhshDeleteUser(@RequestBody @Valid CcbzhshAddUserVo request);

    //2.13.11 创建商家（ccbzhsh/newBusiness）
    @PostMapping(PayHandleUrl.URL_ccbzhshNewBusiness)
    Result newBusiness(@RequestBody EntityCcbBusinessInfo request);

    //2.13.12 更新商家（ccbzhsh/updateBusiness）
    @PostMapping(PayHandleUrl.URL_ccbzhshUpdateBusiness)
    Result updateBusiness(@RequestBody EntityCcbBusinessInfo request);

    @PostMapping(PayHandleUrl.URL_PayHandle_qrCodeRefund)
    public Result qrCodeRefund(@Valid  @RequestBody QrCodeRefundRequest request);

//    @PostMapping(PayHandleUrl.URL_PayHandle_feeRefund)
//    Result feeRefund(@RequestBody FeeRefundRequest request);

    @PostMapping(PayHandleUrl.URL_PayHandle_paraRefund)
    public Result paraRefund(@Valid @RequestBody FeeRefundRequest request);

    @PostMapping(PayHandleUrl.URL_PayHandle_getRecordProcess)
    public Result getRecordProcess(@RequestBody GetRecordProcessRequest request);

    @PostMapping(PayHandleUrl.URL_selectByOrderNos)
    public Result selectByOrderNos(@RequestBody SelectByOrderNosRequest request);

    @PostMapping(PayHandleUrl.URL_gzhRechageRefund)
    public Result gzhRechageRefund(@RequestBody GzhRechageRefundRequest request) ;


    @PostMapping(PayHandleUrl.URL_gzhRechageRefundMng)
    public Result gzhRechageRefundMng(@RequestBody @Valid GzhMngHandleRequest request) ;


    @PostMapping(PayHandleUrl.URL_getOrderInfo)
    public Result<EntityXfRecordProcess> getOrderInfo(@RequestParam("companyId") Long companyId, @RequestParam("tradeNo") String tradeNo);

    @PostMapping(PayHandleUrl.URL_PayHandle_paraRefundB)
    public Result paraRefundB(@Valid @RequestBody FeeRefundRequest request);
}
